/* CSS变量定义 */
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #fff;
    --text-primary: #2c3e50;
    --text-secondary: #636e72;
    --text-tertiary: #95a5a6;
    --primary-color: #3498db;
    --primary-color-dark: #2980b9;
    --border-color: #e0e0e0;
    --card-shadow: 0 2px 8px rgba(0,0,0,10%);
}

/* 分类头部样式 */
.category-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.category-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-header p {
    color: var(--text-secondary);
}

/* 内容布局 */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    width: 100%;
    opacity: 1;
    visibility: visible;
    display: block;
}

/* 文章列表样式 */
.article-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    width: 100% !important;
    margin: 2rem 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.article-card {
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,10%) !important;
    border: 1px solid #e0e0e0 !important;
    margin-bottom: 2rem !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: 200px !important;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,15%);
}

.article-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #2c3e50);
    font-weight: 600;
}

.article-excerpt {
    color: var(--text-secondary, #636e72);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-tertiary, #95a5a6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-primary, #f8f9fa);
    color: var(--text-secondary, #636e72);
    border-radius: 16px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary-color, #3498db);
    color: white;
    transform: translateY(-2px);
}

/* 搜索框样式 */
.search-box {
    background: var(--bg-secondary, #fff);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--card-shadow, 0 2px 8px rgba(0,0,0,10%));
}

.search-box input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #2c3e50);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color, #3498db);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.search-box button:hover {
    background: var(--primary-color-dark, #2980b9);
}

/* 无文章提示样式 */
.no-articles {
    text-align: center;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.no-articles p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.publish-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.publish-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

/* 侧边栏样式 */
.sidebar .widget {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.widget h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.2rem;
}

.about-widget {
    text-align: center;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid var(--bg-primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.social-link:hover {
    color: var(--primary-color);
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-list li:last-child {
    border-bottom: none;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .article-image {
        height: 200px;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
} 

.article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}